﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>:only-child选择器</title>
    <style type="text/css">
    strong:only-child{color:red;}
    </style>
</head>
<body>
        <p>
            <strong>《泊秦淮》</strong>
            <strong>杜牧</strong>
        </p>
        <p>
            <strong>烟笼寒水月笼沙，</strong>
        </p>
        <p>
            <strong>夜泊秦淮近酒家。</strong>
            <strong>商女不知亡国恨，</strong>
            <strong>隔江犹唱后庭花。</strong>
        </p>
</body>
</html>
    
    
    
    